The present invention relates generally to the field of digital image processing and more particularly to the processing of digital images to eliminate shadows and highlights while keeping object details.
A significant problem in digital image processing is distinguishing desired object details from shadows or shading effects. This problem arises from variations in illumination cast onto an object contained in the digital image. The inability to accurately distinguish variations in the illumination falling on an object and variations in the reflectance of light from the object leads to inaccuracies in, amongst other things face recognition applications, for example. While in certain controlled environments, variations in illumination can be tightly controlled in general this is not the case. A number of techniques have been described attempting to address this issue.
U.S. Pat. No. 5,715,325, issued to Bang et al. on Feb. 3, 1998, describes an apparatus and method for detecting a face in a video image using a gradient-based approach. In this technique, an image is normalised with a x-gradient in an attempt to produce a normalised image insensitive to illumination variations. However, this technique is disadvantageous, because this type of operation amplifies noise, while creating a bright line on the image, corresponding to abrupt changes of lighting conditions as shadow.
U.S. Pat. No. 4.695,884, issued to Anastassiou et al. on Sep. 22, 1987, describes a histogram-based approach for correction of shading effects in video images. In this technique, correction of video images for shading effects is attempted by generating a histogram of picture element (pel), gray-scale intensity values and calculating the median and the black and white extremes. However, this technique is disadvantageous, because object details are blurred when details have similar colour as the shadow. The shading effect is not eliminated.
The following three U.S. patents each describe hardware-based approaches. U.S. Pat. No. 5,912,992, issued to Sawada et al. on Jun. 15, 1999, describes a binary image forming device with shading correction means that interpolates shade densities determined using sample points. U.S. Pat. No. 4,523,229, issued to Kanmoto Yoshiaki on Jun. 11, 1985, describes a shading correction method and apparatus. U.S. Pat. No. 5,621,824, issued to Ijiri et al. on Apr. 15, 1997, describes a shading correction method and apparatus. The foregoing methods and apparatuses attempt to correct shading effects by finding a reference block, but are disadvantageous because it is difficult to find a reference block accurately. Further, most objects and lighting conditions are not uniform, that is to say, they can not be referenced by a single block.
Funt, B. V., Drew, M. S., and Brockington, M., xe2x80x9cRecovering shading from color images,xe2x80x9d Proc. European Conference on Computer Vision (ECCV""92), pp. 124-132, Springer-Verlag, May 1992 describes a classical filter-based technique using filters to suppress shading effects. High-pass filters are employed when a shadow is supposed to have a bigger size than object, and vice versa. However, this technique is disadvantageous when complex and noisy objects are involved, since high-pass filters amplify noise while low-pass filters blur details. Furthermore, it is difficult to know the size of shadow a priori.
Daut, D. G., and Zhao, D., xe2x80x9cMathematical Morphology and Its Application in Machine Visionxe2x80x9d, Visual Communications and Image Processing IV, SPIE Vol. 1199, pp. 181-191, 1989; and Sterburg, S., xe2x80x9cBiomedical Image Processingxe2x80x9d, Computer, Vol. 16, No. 1, pp. 22-34, 1983 both describe morphological-based processing. By using a non-linear transform, these techniques attempt to perform an enhancement of photos that contain wide illumination variation. However, these techniques are disadvantageous because, due to lack of priori knowledge about filter size, image details blur when trying to eliminate the shading effect.
Fries, R. W., and Modestino, J. W., xe2x80x9cImage Enhancement by Stochastic Homomorphic Filteringxe2x80x9d, IEEE. Trans. on ASSP, Vol. 27, No. 6, pp. 625-637, 1979 describes the use of homomorphic filters in an attempt to enhance photos under various illuminations. However, this technique is disadvantageous in that it is again difficult to predefine a filter size. Consequently, image details tend to blur when trying to eliminate the shading effect.
Bajcsy, R., Lee, S. W., and Leonardis, A., xe2x80x9cColor Image Segmentation with Detection of Highlights and Local Illumination Induced by Inter-Reflectionsxe2x80x9d, IEEE 10th ICPR""90, pp. 785-790, Atlantic City, N.J., 1990; and Russ, J. C., The Image Processing Handbook, 3rd Ed., Chapter 3: xe2x80x9cColor Shadingxe2x80x9d, Boca Raton, Fla.: CRC Press, 1999 describe color-based approaches. Assuming that shading does not take effect on some spectrum (or some linear transforms of spectrums), these techniques attempt to enhance photos by mapping them to light-invariant spectrums. However, each of these techniques is disadvantageous for at least two reasons. Firstly, content details sometimes have a colour similar to that of shadows. If so, applying such algorithms blurs images and affects the accuracy of recognition. Secondly, such techniques can become unstable when the illumination is too dark or too bright. Thus, the techniques cannot manage either black scenes or highlights. These drawbacks become highly intolerable in face recognition systems, since face images are full of details as well as highlights (glass for instance) and dark regions (for example, hair and eyes).
Thus, a need clearly exists for an improved technique of processing digital images to distinguish object features from shadows in the digital images.
In accordance with a first aspect of the invention, there is disclosed a method of cancelling lighting variations in a digital image of a specified class of objects. The method includes the steps of:
estimating lighting parameters and a reliability for each pixel of the digital image using a stochastic model of the specified object class;
segmenting the digital image into regions having different lighting parameters;
distinguishing object details in the digital image from shadows in the digital image;
splitting and merging regions containing object details into nearest regions;
estimating predetermined lighting-parameter characteristics for each split and merged region; and
reconstructing the digital image based on the estimated lighting-parameter characteristics.
In accordance with a second aspect of the invention, there is disclosed an apparatus for cancelling lighting variations in a digital image of a specified class of objects. The apparatus including:
a device for estimating lighting parameters and a reliability for each pixel of the digital image using a stochastic model of the specified object class;
a device for segmenting the digital image into regions having different lighting parameters;
a device for distinguishing object details in the digital image from shadows in the digital image;
a device for splitting and merging regions containing object details into nearest regions;
a device for estimating predetermined lighting-parameter characteristics for each split and merged region; and
a device for reconstructing the digital image based on the estimated lighting-parameter characteristics.
In accordance with a third aspect of the invention, there is disclosed a computer program product having a computer usable medium having a computer readable program code module embodied therein for cancelling lighting variations in a digital image of a specified class of objects. The computer program product includes:
a computer readable program code module for estimating lighting parameters and a reliability for each pixel of the digital image using a stochastic model of the specified object class;
a computer readable program code module for segmenting the digital image into regions having different lighting parameters;
a computer readable program code module for distinguishing object details in the digital image from shadows in the digital image;
a computer readable program code module for splitting and merging regions containing object details into nearest regions;
a computer readable program code module for estimating predetermined lighting-parameter characteristics for each split and merged region; and
a computer readable program code module for reconstructing the digital image based on the estimated lighting-parameter characteristics.